package com.my.content.utlis;

import android.content.Context;
import android.content.Intent;

import com.my.content.liveproject.LiveActivity;

import java.util.ArrayList;

/**
 * 类描述:
 * 创建人:
 * 创建时间:2016/10/19.
 * 备注:
 */
public class UIManager {

    //开启一个Activity
    public static void startActivity(Context context, Class clazz) {
        context.startActivity(new Intent(context, clazz));
    }

    //开启一个Activity
    public static void startActivity(Context context, Class clazz, String res) {
        Intent intent = new Intent(context, clazz);
        intent.putExtra("url", res);
        context.startActivity(intent);
    }

    //开启一个Activity 两个参数的
    public static void startActivity(Context context, Class clazz, String res, String itemUrl) {
        Intent intent = new Intent(context, clazz);
        intent.putExtra("url", res);
        intent.putExtra("item", itemUrl);
        context.startActivity(intent);
    }

    //activity中轮播图片
    public static void startActivity(Context context, Class clazz, String position, ArrayList<String> data) {
        Intent intent = new Intent(context, clazz);
        intent.putExtra("position", position);
        intent.putStringArrayListExtra("data", data);
        context.startActivity(intent);
    }
    //跳转到直播页面
    public static void startLive(Context context,String path,String title){
        Intent intent = new Intent();
        intent.putExtra("path",path);
        intent.putExtra("title",title);
        intent.setClass(context, LiveActivity.class);
        context.startActivity(intent);
    }





}
